<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style></style>
</head>

<body>
  <table>
    <thead>
      <tr>
        <th> </th>
        <th> </th>
        <th> </th>
      </tr>
    </thead>
    <tbody id="show">
    </tbody>
  </table>
  <script>
    //获取元素
    var show = document.getElementById('show');
    //点击事件
    //创建对象
    var xhr = new XMLHttpRequest();
    //监听且接收响应体
    xhr.onreadystatechange(
   if (xhr.readyState == 4) {
      if (xhr.status >= 200 && xhr.status < 300) {
        var result = xhr.responseText;
        var datajson=JSON.parse(result);
        show.innerHTML+=``
      } else {
        console.log('返回其他状态码');
      }
    }

  );
  //设置请求信息
  xhr.open('GET','/list',true);
  //发送
  xhr.send();
  </script>

</body>

</html>